{extend name='common/common' /}

{block name="style"}
<link href="__JS__/plugins/bootstrap-tagsinput/bootstrap-tagsinput.css" rel="stylesheet">
{/block}

{block name="content"}
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-10">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>查看跟踪信息</h5>
                </div>
                <div class="ibox-content">
					<div class="layui-form">
						<table class="layui-table">
							<colgroup>
								<col width="50">
								<col width="100">
								<col width="100">
								<col width="320">
								<col width="150">
								<col width="50">
							</colgroup>
							<thead>
							<tr>
								<th>ID</th>
								<th>客户名字</th>
								<th>录入人</th>
								<th>内容</th>
								<th>时间</th>
								<th>操作</th>
							</tr>
							</thead>
							<tbody class="trackList">
								<?php if(empty($memTrackArr)): ?>
									<tr>
										<td colspan="6" class="text-center span-strong">暂无数据</td>
									</tr>
								<?php else: ?>
									<?php foreach($memTrackArr as $val): ?>
									<tr>
										<td><?=$val['id'];?></td>
										<td><?=$val['m_name'];?></td>
										<td><?=$val['u_name'];?></td>
										<td><?=$val['content'];?></td>
										<td><?=$val['time'];?></td>
										<td>
											<a href="javascript:void(0);">
												<button onclick="tosee(<?=$val['id']?>);" type="button" class="btn btn-primary btn-sm" style="background-color:#1ab394;border-color:#1ab394;">
													查看
												</button>
											</a>
										</td>
									</tr>
									<?php endforeach;?>
								<?php endif;?>
							</tbody>
						</table>
					</div>
                </div>
            </div>
        </div>
    </div>
</div>
{/block}

{block name="script"}
<script src="__JS__/jquery.min.js?v=2.1.4"></script>
<script src="__JS__/bootstrap.min.js?v=3.3.6"></script>
<script src="__JS__/content.min.js?v=1.0.0"></script>
<script src="__JS__/plugins/bootstrap-tagsinput/bootstrap-tagsinput.min.js"></script>
<script src="__JS__/plugins/validate/jquery.validate.min.js"></script>
<script src="__JS__/plugins/validate/messages_zh.min.js"></script>
<script src="__JS__/layui/layui.js"></script>
<script src="__JS__/jquery.form.js"></script>

<script type="text/javascript">
	var tosee = function(id){
		$.post("{:url('member/trackMember')}",{tid:id},function (data){
			app = '<div class="form-group" style="width:100%;height:96%;padding:10px">'+
				data["content"]
				+'</div>'
            layer.open({
                title: '追踪信息',
                type:1,
                area:["50%","50%"],
                content: app
            });
		})
	}
</script>
{/block}
